#pragma once
#include "EffectProp.h"

// CPropEdit

class CPropEdit : public CEdit
{
	EffectData	m_Data;

public:
	CPropEdit( CWnd* pParent, CRect& rt, LPCTSTR szValue, WORD ID );
	CPropEdit( CWnd* pParent, CRect& rt, int32 nValue, WORD ID );
	CPropEdit( CWnd* pParent, CRect& rt, float32 fValue, WORD ID );

	void Update( BOOL IsGet );

	virtual LPCTSTR		GetStr()			{ return m_Data.CStr(); }
	virtual int32 		GetInt()			{ return m_Data.Int(); }
	virtual float32		GetFloat()			{ return m_Data.Float(); }

	virtual void		SetStr( LPCTSTR v )	{ m_Data = v; Update( FALSE ); }
	virtual void		SetInt( int32 v )		{ m_Data = v; Update( FALSE ); }
	virtual void		SetFloat( float32 v )	{ m_Data = v; Update( FALSE ); }

protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg UINT OnGetDlgCode();
};


